<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            list-style: none;
        }

        .box {
            position: relative;
            width: 490px;
            height: 170px;
            background: #f00;
            margin: 0 auto;
        }

        .img2 {
            display: none;
        }

        ul {
            position: absolute;
            right: -110px;
            bottom: -20px;
            display: flex;
            height: 20px;
            color: #fff;
            /* background: #ccc; */

        }

        li {
            width: 20px;
            background-color: orange;
            margin: 0 5px;
            border-radius: 50%;
            text-align: center;

        }
    </style>
</head>

<body bgcolor="#000">
    <div class="box">
        <img src="./image//10.PNG" alt="" class="img1">
        <img src="./image/11.PNG" alt="" class="img2">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
        </ul>
    </div>
</body>

</html>
<script>
    var lis = document.querySelectorAll('li')
    var img1 = document.querySelector('.img1')
    var img2 = document.querySelector('.img2')
    var flag = 1
    for (var i = 0; i < lis.length; i++) {
        lis[i].onmousemove = function () {
            this.style.background = '#f00'
        }
        lis[i].onmouseout = function () {
            this.style.background = ''
            if (flag == 1) {
                img1.style.display = 'none'
                img2.style.display = 'block'
                flag = 0
            } else {
                img1.style.display = 'block'
                img2.style.display = 'none'
                flag = 1
            }
        }
    }
</script>